package com.fz.Adapter;

import java.util.ArrayList;
import java.util.List;

import android.R;
import android.R.string;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class MyHorizontalListAdapter extends MyBaseAdaper<String> {


	public MyHorizontalListAdapter(Context context) {
		super(context);
	}

	@Override
	View getMyView(int arg0, View arg1, ViewGroup arg2) {
		ViewHolder listitem;
		if(arg1==null){
			arg1=inflater.inflate(com.fz.test.R.layout.horizonallistviewitem, null);
			listitem=new ViewHolder(arg1);
			arg1.setTag(listitem);
		}
		else{
			listitem=(ViewHolder) arg1.getTag();
		}
		String name=(String) getItem(arg0);
		listitem.listitem.setText(name);
		return arg1;
	}
	class ViewHolder {
		TextView listitem;

		public ViewHolder(View v) {
			listitem=(TextView) v.findViewById(com.fz.test.R.id.listitem);
		}
		
	}

}
